package com.joey.concurrency.example.queue;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * Queue full
 * @Author hyy
 **/
public class ArrayBlockingQueueExample3 {

    static ArrayBlockingQueue arrayBlockingQueue = new ArrayBlockingQueue(2);

    public static void main(String[] args) {

        for (int i = 0; i < 20; i++) {
            arrayBlockingQueue.add(i);
            System.out.println(arrayBlockingQueue.size());
        }

    }
}
